|
Install VS 2005 and SQL Server 2005 - gotta go to 2005 sometime.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
(Translation: I'll show you the way, but not write the code for you.)
|
|
|
|
|
Hi there ,
I have just joined this forum . I want to access the serial and parallel
port through Visual Basic . Where can i get the free software to do that
and the respective drivers (in case needed).
Thanx a lot for ur help
|
|
|
|
|
Welcome to The Code Project.
Depends which version of VB you are using. If VB 6.0 you'll need extra bits. If VB .NET 2005 (.NET 2.0) I believe that there is inbuilt support for those ports.
In any case, there is a whole lot of info on The Code Project. Just search for parallel port or serial port articles (Search function at top of page). That'll reveal many good articles and "how-to's".
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
(Translation: I'll show you the way, but not write the code for you.)
|
|
|
|
|
Hi there,
I want to load the input xml,xsl and the transformed xml while loading the project. for example in any of the java application we store them as project files, can we do the same thing in vb.net also????
Thanks in advance..
Bharath.s
|
|
|
|
|
You want to make the xml/xsl part of your project file ? You can do that if you want, but I don't see any reason to, unless of course you want to embedd them in the exe. In that case, just add to the project, and then change their type to 'embedded resource'.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
My applcation is selecting a file on a list box.
When click the file, the image file will display in a picture box.
The type of image maybe .jpg, .bmp, .png, .tif.
The size of the image around 2000*2000
How can they use me 100MB memory to render each time?
What I do is just image.fromfile(filePath)
How to improve the memory usage?
|
|
|
|
|
2000x2000 = 4 million pixels. Each pixel takes 4 bytes in a 32 bit image. So that 16 million bytes. That's 156 MB. I guess your image is 24 bit, that would come to around 100 MB.
Why are you using an image that's bigger than your screen resolution ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank you first,
actually, I am going to write an application like viewing photo taken by Digital Camera.
What I would like to know is, when we using viewing photo software,
like painter or IrfanView.
They won't use up such large memory.
|
|
|
|
|
Dave is right, I typed one too many zeros into the calculator. It's 16 MB. I suspect that your method of working out the memory used is just wrong.
Or you're leaking resources.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: So that 16 million bytes. That's 156 MB.
Huh? That's how many MB??? Is there something in the air in Toronto I don't know about?? (That's quite likely actually!)
BTW, Welcome to the other side of the world! You've managed to land about 185 miles East of me. Take 401 West to 402 West to Sarnia. Cross the bridge into Michigan and you've found where I work!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'll be honest Dave - I was seeing double yesterday after 24 hours on planes, etc.
Dave Kreskowiak wrote: You've managed to land about 185 miles East of me. Take 401 West to 402 West to Sarnia. Cross the bridge into Michigan and you've found where I work!
Damn, I wish I'd known. I've had made that trip to have a coffee with you. I'm back in Hobart again now.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
No worries! I've been running my a$$ off so much at work I rarely get a lunch, let alone time to spend with anyone.
Maybe at the next MVP Summit!! I'll find out April 1st.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Cool - I find out if I'm still an MVP on the same day. When I was told that would happen last year, it just made me think all the more that it was an elaborate joke Good luck - it sure would be nice to see you there next March.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I used an usercontrol embeded in IE.
There was a richtextbox in the usercontrol, For this RichTextBox, I can't use CTRL-C shortKey, but CTRL-X,CTRL-V,CTRL-Z are all OK.
I used Keydown event to detect the CTRL-C event, but it confused me that CTRL-C can't be detected.
Is there a method to using CTRL-C copy function shortKey.
|
|
|
|
|
I have written a short program to insert data into my database using the objectdatasource control. I have set the insert method, pass it parameters, but the data adds on twice. Running the project with breakpoints, it found out that the func calls itself after it finishes once.
Why would it do that?
localhostdatasource.InsertParameter.Add("", Typecode.DateTime, var1)
localhostdatasource.InsertParameter.Add("", var2)--->string
localhostdatasource.Insert()
then it loops back ...........
|
|
|
|
|
Most likely it does not call itself, it is an event and the function has been added to the event twice, ergo it will be called twice.
Search your solution for the function name and see if it's being added to an event twice.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have checked the project. It is a simple project and that is the only add button.
|
|
|
|
|
Have you searched for the function name ? Do so, and paste every line that contains the name of the function, I'm sure I'll find the problem from there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
If the function name you are refering to is the objectDataSource.Insert(), that is an inbuilt func. there is no reason for it to be calling itself.
But at the end it does have a func call to refresh the gridview as the last line in the event, but when it comes back it goes through the whole event again.
localhostdatasource.Parameters..............
localhostdatasource.Insert()-------> inbuilt
gridload()--------> myfunc
sub gridload()
localhostdatasource.Select()
end sub
-- modified at 19:13 Tuesday 21st March, 2006
|
|
|
|
|
Dim rstrToAdd As Date = New Date(rosterCal.SelectedDate.Year, rosterCal.SelectedDate.Month, _
rosterCal.SelectedDate.Day, Integer.Parse(rstrHrList.SelectedItem.ToString), _
Integer.Parse(rstrMinList.SelectedItem.ToString), 0)
resultText.Text = rstrToAdd + " " + rosterCal.SelectedDate.DayOfWeek.ToString
localhostDataSource.InsertParameters.Clear()
localhostDataSource.InsertParameters.Add("dtRstr", TypeCode.DateTime, rstrToAdd)
localhostDataSource.InsertParameters.Add("day", TypeCode.String, rosterCal.SelectedDate.DayOfWeek.ToString)
localhostDataSource.Insert()
'gridLoad()
this is the add func
|
|
|
|
|
i'm not sure i did it right, but i think not cause it's not working. I had already save some line in the txt file, where now i trying to retrieve those infomation line by line to the other form. For the for loop section, anyone can tell me am i doing it right?
-----
Dim strmw As StreamReader
Dim myInputString As String
Dim filePath As String = Path.GetDirectoryName(Application.ExecutablePath) & "\save\testing.txt"
Dim x, num As Integer
Dim respond As MsgBoxResult
respond = MsgBox("Load file???", MsgBoxStyle.Question + MsgBoxStyle.YesNo)
If respond = MsgBoxResult.Yes Then
strmw = File.OpenText(filePath)
'loop the line for different person detail
num = strmw.ReadLine()
For x = 1 To Val(num)
' write detail in the record
x = strmw.ReadLine()
wpname(x).Text = strmw.ReadLine()
wPP(x).Text = strmw.ReadLine()
wcounter(x).Text = strmw.ReadLine()
Next
form2.PTurn.Text = strmw.ReadLine() 'get whos turn
strmw.Close()
MsgBox("Loading sucess", MsgBoxStyle.OKOnly)
Else: Exit Sub
End If
|
|
|
|
|
campbells wrote: but i think not cause it's not working
So what's not working about it? Have you traced the code in debug mode to see what is happening?
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
(Translation: I'll show you the way, but not write the code for you.)
|
|
|
|
|
num = strmw.ReadLine()
- i assume you have a number on the first line of your textfile
For x = 1 To Val(num)
- then you read another number and modified x, where x is your loop control counter
- the loop itself is pretty much destroyed with the next statement
<code> x = strmw.ReadLine()</code>
wpname(x).Text = strmw.ReadLine()<br />
wPP(x).Text = strmw.ReadLine()<br />
wcounter(x).Text = strmw.ReadLine() <br />
<br />
Next
you probably need to change your loop control. use <code>while .. do .. loop </code>instead
or you could post a sample of your data(textfile) so we could help you better and probably suggest
a working snippet.
Marvin N. Guerrero
- Taje Kage_bunshinNunJutsU
|
|
|
|
|
the game maybe have 1-4 player, so let said in this round have
3 players
player:1
NAme:A
Position:10
Movestep:2
player:2
NAme:B
Position:8
Movestep:2
player:3
NAme:C
Position:7
Movestep:2
-- so i was thinking to use the x value to loop 3 times since got 3 player
and read 4 line accordinly.... am not sure can it work but i only know a bit on using the readline.
|
|
|
|
|
This is a really inefficient way of doing this. You'd be better off writing it in a CSV format (commna delimited):
Name,Age,Sex,Something
"Amy",17,"F",123456
"Bobby",18,"M",123456
This will make it easier to parse and easier to recover from a lightly corrupted file.
Better yet, use XML!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|