|
I would recommend that you DON'T use the VB6 Upgrade Wizard. It puts alot of code in to simulate the way VB6 did things, which can be pretty inefficient when compared to correctly rewritten code in VB.NET.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can someone provide a checklist on different runtime errors that can occur during drive / directory / file operations ( this is general for any language ) .
Divya Rathi
|
|
|
|
|
|
thanks !!!!!!
The link is exactly what i wanted
Divya Rathi
|
|
|
|
|
You'll have to built that yourself. Lookup each method that your going to use (like Directory.GetDirectories[^] for instance), and look at the Exceptions that each can throw.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dim conMyData = New SqlConnection(ConfigurationManager.AppSettings("psmConnectionString"))
cmdSelect = New SqlCommand("DBAuthenticate", conMyData)
cmdSelect.CommandType = CommandType.StoredProcedure
paramReturnValue = cmdSelect.Parameters.Add("RETURN_VALUE", SqlDbType.Int)
paramReturnValue.Direction = ParameterDirection.ReturnValue
cmdSelect.Parameters.AddWithValue("@NoPekerja", noPekerja)
cmdSelect.Parameters.AddWithValue("@pWord", pWord)
conMyData.open()
there is my code.But it i try to debug it,the conMyData is not working?
any help plizz.
|
|
|
|
|
Standard question #1:
What do you mean by "not working"?
---
b { font-weight: normal; }
|
|
|
|
|
when i try to run it exception apper.InvalidOperationException. it highlighted the conMydata.open() and said ==> The ConnectionString property has not been initialized.
how could i solve it?
|
|
|
|
|
You have forgotten to put the connection string in the configuration file.
---
b { font-weight: normal; }
|
|
|
|
|
i've put the connection string in the webconfig file.but the same error still appear.Is there any place else should i put it?pliz man help me.how should i initialize the connection string?
|
|
|
|
|
Set a breakpoint on the line that grabs the connection string from the config file and VERIFY that it indeed does return what you think it does.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
I want to launch a program when a user login from a service (running as a system service). Of course in need the instance of this program to be visible for the user who just logged in.
I manage to check if the user is logged or not , but i'm not able to launch a visible application (a third party program) for the user...
Thx in advance,
|
|
|
|
|
Is your service tagged for "Allow service to interact with Desktop"? If not, you won't see a thing.
Start/Programs/Administrative Tools/Services. Double click your service to open its properties. CLick the Logon tab, make sure the logon account for the service is the Local System account, then you can enable the "Allow service to interact with Desktop" option.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
does any one have a tempature converter already made up, if so could you send me the code for it
|
|
|
|
|
1. In what way do you want to convert temperature? Is it the classic Calcius/Fahrenheit conversion?
2. This sounds very much like a school assignment. Is it? If so, you should do it yourself. If you get stuck you can certainly ask for help, but don't expect to get the entire solution handed to you.
---
b { font-weight: normal; }
|
|
|
|
|
sorry should have been more detailed, yes school assignment, I don't want to cheat and use someone else code, I want to see how it it done, if it makes whomever post it to leave some stuff out of code thats cool, I will figure it out, I just don't have alot of time between work and stuff. If no one posts one that cool too. I don't want the whole solution. Just need one that you put first name in last name and then temp to be converted to celcius.
|
|
|
|
|
Hi all,
I have this simple piece of code:
Set app = CreateObject("CrystalRuntime.Application")
set report = app.OpenReport("r1.rpt", 1)
report.Save "out.rpt"
The 'Save' method gets STUCK and hangs my machine.
This only happens if the input report has a GRAPH in it. If I delete the graph, the Save method works!
What is going on?
I'm using CR XI release 2, by the way.
Thanks
/=/=/=/= Sagmam =\=\=\=\
-- modified at 4:48 Sunday 19th February, 2006
|
|
|
|
|
okay..i wanna trun on/off the LED through lpt port of computer...i have all h/w concept to do so...but no ...concept of coding in vb.net...can any one help me
plz do tell me its solution...or any idea
okay
thnx
sarahmeshte
|
|
|
|
|
|
hi
i am working on multimedia databases
now i wanna ..convert my image in bytes n then store that in databases
i got a PROBLEM HERE PLZ
DO WRITE ME ITS CODE...OR GIVE ME ITS COMCEPT
thnx
sarahmeshte
|
|
|
|
|
hi,
how to use "Visual Brush" to magnifying the specified area.
thanx
your
peter
|
|
|
|
|
|
Hi guys,
So I'm trying to code a sample application for a fingerprint scanner that I recently bought from supremainc.com. Now the sample they provided alongwith is in VB6. I've been successfully able to convert most of the code to VB.NET. The part upto capturing an image is working fine. But when it comes to verification, the old VB6 code uses the VarPtr function - which isn't there in .NET anymore.
Now testing the sample application won't be possible for any of you - coz you'd need the actual device to get it working. But still I'm including the code for both VB6 and .NET here - at least looking at it might help.
Searching for a VarPtr replacement, I came across this code from PlanetSourceCode
===========================================================================
Public Function VarPtr(ByVal o As Object) As Integer
Dim GC As System.Runtime.InteropServices.GCHandle = _
System.Runtime.InteropServices.GCHandle.Alloc _
(o, System.Runtime.InteropServices.GCHandleType.Pinned)
Dim ret As Integer = GC.AddrOfPinnedObject.ToInt32
GC.Free()
Return ret
End Function
===========================================================================
The VB6 code contains this segment:
===========================================================================
Private EnrollTemplate(383, 9) As Byte
.......
.....
Dim Buffer(9) As Long
............
For i = 0 To 9
Buffer(i) = VarPtr(EnrollTemplate(0, i))
Next i
===========================================================================
So I used that in my VB.NET application - and am calling the routine this way:
===========================================================================
Private EnrollTemplate(383, NUM_RECORDS) As Byte
............
Dim Buffer(10) As Integer
...............
For Counter As Integer = 0 To NUM_RECORDS - 1
Buffer(Counter) = VarPtr(CType(EnrollTemplate(0, Counter), Object))
Next
===========================================================================
But it doesn't seem to have the same effect - so my verification is failing.
Also as per the discussion in this thread: http://www.vbcity.com/forums/topic.asp?tid=121051 I've converted the Long variables in the VB6 code to Integer for VB.NET. The code samples (full) I'm talking about can be found attached to the vbCity thread, as the posts here don't permit attachments.
Please find both versions of the project included as .zip attachments. Kindly take a look at them and see if any of you can spot what's going wrong. I know it's difficult to do so - without the code actually running.. but still.
In case you want to look into the Scanner SDK API calls, I'm including the API documentation too in form of a .PDF file.
Any help will be greatly appreciated. Please check out the discussion in the vbCity thread first and go through the code files.
Best Regards & Thanks,
kil0byte^bandit
PeoPLe aRe cRazY anD tiMeS aRe sTRaNGe, i'M LoCKeD iN tiGhT, i'M OuT oF raNGe, i uSeD t0 caRe BuT - thiNGs haVe chaNGeD.
-- modified at 0:21 Sunday 19th February, 2006
|
|
|
|
|
Hi Guys!! Im trying to Make a Bittorrent Client in VB.Net 2005. I want to run the main form of my Project on a Thread and for that i have started my Project with a Module. The Module calls the Form in its Main() function.
What i wanted to do was to create a thread an load the main form in this Thread so that my Main Form runs in the Background. How do i achieve this. The Following code doesnt seem to work:
Dim myThread as new Thread(new ThreadStart(AddressOf MainForm.Load))
myThread.Start()
The Error is that i cannot call the load event inside ThreadStart. So i Dont know what to write after 'AddressOf' so that my Main Form gets Loaded and it runs when the myThread.Start() method is Called.
If anybody know what to do, Plz write back to me. Thank You!!
Devraj Raut!!!
|
|
|
|
|
Devraj Raut wrote: The Error is that i cannot call the load event inside ThreadStart.
You're supposed to pass it a method. An event is not a method.
Also, I don't think it's a good idea to launch a form on a different thread. Forms and their controls are not thread safe and are not supposed to interact with other forms/controls/etc. on a separate thread.
Instead, I recommend that you run your bittorrent code on a different thread. If you want it to update your form, then you should look into using BeginInvoke() to do this in a thread safe manner.
http://www.codeproject.com/csharp/begininvoke.asp[^]
|
|
|
|