|
A couple of ways
1. use a module not my favourite suggestion
public module GlobalVariables
public foo as string
end module
2. shared class with shared variables
public shared class FooBar
public shared SomeValue as integer =1
end class
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
I have one using excel 2000 vba.now we upgrade use window 8 64 bit and excel 2010 so
when I add control listview, it show message "Library not registered"
anybody has idea?
Best regards
|
|
|
|
|
Samoeurn wrote: I have one using excel 2000 One what?
Samoeurn wrote: when I add control listview, it show message "Library not registered" What library, where does the message appear, what line of code ... ?
Please be clear and specific with the details of your problem. Remember, we cannot see your screen.
Veni, vidi, abiit domum
|
|
|
|
|
I have One VBAProject that is excel add in. If I use window 8 x86, it works perfectly but now our company upgrade using window x64.it has one problem,one control is not support "Listview" and shows error message below:
1.Library not registered
2.Compile error in hidden module: frmChart
this error commonly occurs when code is incompatible with the version,platform, or architecure
of this application. Click "help" for information on how to correct this error.
please kindly help appreciate
Thanks
|
|
|
|
|
Samoeurn wrote: code is incompatible with the version,platform, or architecure Rebuild your addin on the new platform.
Veni, vidi, abiit domum
|
|
|
|
|
Samoeurn wrote: anybody has idea?
You've referenced a COM-library in your sheet that's 32-bit. It does not get loaded in the 64-bit version of Excel. Then it crashes.
Solution; get a 64 bit version of the library, or switch back to 32-bit Office.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Top of each form, modules and classes that have references. Fill in the blanks.
#If Win64 Then
put your 64 bit library references here
#ElseIf Win32 Then
put your 32 bit library references here
#Else
Msgbox "You are either trying to run this from a computer " _
"you found at a yard sale or you bought an Apple"
#End If
|
|
|
|
|
Send a Text Message to a Cell Phone from a VB.NET Application
|
|
|
|
|
Why not make an effort to do your own search for examples of code for this. Paste your question into Google for a start.
Veni, vidi, abiit domum
|
|
|
|
|
|
I hope its not for spamming and spoofing! I am getting tired of Sarah from Consumer Services calling me on a spoofed voip line. I would be more upset if they were wasting my message limit
|
|
|
|
|
Is it possible to create a MySql view using vb2008 If yes can anybody provide with some tips on how to do that.
Thanking in advance.
|
|
|
|
|
SPSandy wrote: Is it possible to create a MySql view using vb2008 Yes.
SPSandy wrote: If yes can anybody provide with some tips on how to do that. Using the ExecuteNonQuery method of the IDbCommand class; you'd execute a SQL-query (Google for examples) containing a "CREATE VIEW" statement (again, Google has the syntax).
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
My apologies for the above answer; it may be correct, but it is hardly helpfull. Let me see if I can improve on the answer above. There's an abstract example of what you want to achieve below; (abstract as in it contains a bit pseudocode, not as "an abstract class")
Public Sub CreateView()
Using con As New MySqlConnection("your connection string here")
Using cmd As MySqlCommand = con.CreateCommand()
con.Open()
cmd.CommandText = _
" CREATE VIEW view_name AS " +
" SELECT column_name(s) " +
" FROM table_name " +
" WHERE condition "
cmd.ExecuteNonQuery()
con.Close()
End Using
End Using
End Sub
There are a few resources you might need;
I'd also recommend downloading at least VS2010; it comes with .NET 4, which performs a bit better than the 2.0 runtime. Also gives you some nice extra's, like mini-dumps in .NET - very powerfull when debugging with one o' those. There were also some nice language-enhancements in the IDE. An upgrade would well be worth the effort.
Since you'd be going to create views, I'd also like to point out that there are various options for naming those views. It'd be redundant to add the word "view" to it, but looking at other databases, it also looks like a tradition. MySQL does not allow some characters in the view-name. The W3Schools shows such an example with spaces.
Please don't do that. Just do it without spaces. It's not just MySQL that could blow up; furtherdown the line, there's probably an ORM or something generated from that view (like a report) and than that will blow up. Then the problem probably gets posted here, and I blow up.
Going offtrack a little further; for those wondering why I have a macro autofill the quotes to a single level - it makes it easy to cut & past the query into SQL Managment Studio (using block-select, ALT-SHIFT while you select text) and to paste it back into VS.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks a lot. This was really very useful.
|
|
|
|
|
I am just wondering if it's posible to make that?
I have my MyApplication.exe inside my form and I want it to be just fix on its location?
System.Diagnostics.Process.Start("MyApplication")
Dim P As System.Diagnostics.Process = System.Diagnostics.Process.GetProcessesByName("MyApplication")(0)
P.WaitForInputIdle()
SetParent(P.MainWindowHandle, Me.Panel1.Handle)
We can resize the panel by adding
MoveWindow(P.MainWindowHandle, 0, 0, 500, 300, True)
but its posible to make it fix on that location?
modified 11-Feb-14 10:52am.
|
|
|
|
|
Your question is not clear at all. Please try to explain it better
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
I think this link help me a lot
http://www.codeproject.com/Articles/101367/Code-to-Host-a-Third-Party-Application-in-our-Proc
Thank you
|
|
|
|
|
No, you can't. You don't have direct control over the window of a seperate process.
The thing is that the external process does not know it's window is inside your window. It thinks and works exactly like it was running on the desktop. The desktop is itself a window, just like your Panel control.
If the user grabs the title bar of the external process, they can move the window around and your code will not know anything about it. There are no events that tell you if the external process window is being moved.
The users can also hit the minimize and maximized buttons on the external process window and they will work, just as if the window was on the desktop. You can't 100% stop that from happening.
|
|
|
|
|
EYESTRA1N wrote: I have my MyApplication.exe inside my form and I want it to be just fix on its location? Let me rephrase that; you want to remove the title-bar on a Window.
Go here[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thank you so much for the answers
It really help me a lot.
|
|
|
|
|
Hi,
I want to preview word (.docx) document on user form control in vb.net 2012. Please provide any solution!!! Urgent.
|
|
|
|
|
|
Hi Richard,
Already tried this but when followed the suggested code and steps, it is not previewing the document file in control, rather throwing dialogue box to either open / save file in respective software. but not in form.
And here in my scenario I want to view the document on form itself, in web browser control.
Any help will be highly grateful. Please...!!!
|
|
|
|
|
Danish1987 wrote: Already tried this Anything else you tried that I need not mention?
Danish1987 wrote: And here in my scenario I want to view the document on form itself, in web browser control. Why was this not in the original question?
If you want to show a docx in a webbrowser, you'll need Word to be installed on the client.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|