|
Set the forms controlbox property to false or none .
Posted by The ANZAC
|
|
|
|
|
set the minimize box property =false
maximizebox property =false
taher
|
|
|
|
|
I want to display data from the text file in the combo box but it should be displayed line wise. How should I do
Thanks
taher
|
|
|
|
|
is your text file is formatted in some way ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
the text file contains text in similar format
textfile.txt
line1
line2
lin3
end of text file
the combo box should contain in a drop down menu and not in single line
thanxs
taher
|
|
|
|
|
taherjaorawala wrote: the combo box should contain in a drop down menu and not in single line
what do you mean ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Try the following:
Dim data As String() = System.IO.File.ReadAllLines("c:\test.txt")
ComboBox1.Items.AddRange(data)
|
|
|
|
|
Hi ASP.NET Experts,
I just started exploring in Visual Studio 2005, so would like to ask a few questions on that.
Q1)
As I know we have to create new web site for a web application right.
May I know how to do the "Copy Project - with compiled source code" in
VS2005? It has the "copy web site" only right. Since it is not a
project, how to make it to be compiled source code? Would it come out
with the DLL, no right? Any idea or best practice way to do that if we
wanted to do the deployment on a web application?
Q2)
What is the used of App_Code, App_Data and so on? Is it good to design the achitecture in those folder?
Thanks and appreciate for your advice.
eccw
|
|
|
|
|
I am writing a reader driver by using visual basic.net. I want to flow a package in bytes to the reader. But it encounters some problems in sub programme sending package. Can anyone give me some suggestions??Thank you for your great help!!
Public Class RS232
Dim buffer As Byte()
Dim offset As Integer
Dim count As Integer
Dim returnValue As Integer
Dim value As Boolean
Dim target As Integer
Dim Data As Byte
Dim response As Byte()
Dim currentSerialPort As System.IO.Ports.SerialPort
Public Sub send_packet(ByVal cmd As Byte, ByRef b As Byte())
Dim crcresult As Byte
' 1. send preamble
buffer(0) = &HA55A ' wrong ******************************
' 2. send command
buffer(1) = cmd ' wrong *****************************
' 3. send data (optional)
buffer(2) = Data
' 4. calc crc
crcresult = calc_crc(b)
' 5. send crc
buffer(3) = crcresult
' may be wrong *****************************
currentSerialPort.Write(buffer, 0, 3)
End Sub
End class
|
|
|
|
|
loksiu01 wrote: buffer(0) = &HA55A ' wrong
The value &HA55A is a two byte value. That should be:
buffer(0) = &HA5
buffer(1) = &H5A
or perhaps the other way around, depending on the endianess used.
loksiu01 wrote: buffer(1) = cmd ' wrong
What's wrong with that (except that the command will be the third byte, not the second byte)?
loksiu01 wrote: buffer(3) = crcresult
' may be wrong
Why do you think that?
---
single minded; short sighted; long gone;
|
|
|
|
|
Really thx for your help~
actually when I run the programme step by step
buffer(0) = &HA5
It stopped and said
Use the "new" keyword to create an object instance
Check to determine if the object is null before calling the method
So I think It is wrong~
Why does it happen? Appreciate for your help~
|
|
|
|
|
You haven't created any array.
Dim buffer(4) As Byte
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi
Been looking for VB.Net example on midi files, but only seem to get C++ or C# stuff.
Can anyone point me to an example in VB.
I want to write something that can:
a) Play a midi file
b) Change track levels realtime
c) Change instruments for the tracks
d) Transpose tracks
e) Display the levels of the individual tracks realtime
f) Save the changes made to the file
As a start though, if I could just find some vb.net code to play a midi file and I can get to the other stuff once I understand that basics
Cheers for any help!
R
|
|
|
|
|
Hello,
I want to be able to calculate how long an event took. The user will enter the data using a datetimepicker for the start date, and when the event ends enter the stop date in a datetimepicker.
Does the datetimepicker capture the time when the date was set in one of these controls?
I have been using the dateDiff to calculate. However, it only gives me the difference between to dates but not the actual time it was set.
For example 26/2/2007 14:00 started
finisted at 28/2/2007 10:00
The total time would be 1 Day 4 hours (working 9 to 5pm)
Can anyone have any good ideas on how to calculate this,
Many thanks,
Steve
|
|
|
|
|
Try using the 'DATE DIFFERNECE' function ..... DDiff...
|
|
|
|
|
Hello,
That was the function that I was using. But I was having trouble calculating the hours that elapsed.
Thanks for any suggestions,
Steve
|
|
|
|
|
hi i want to keep connection string common to all windows forms as we keep in web.config file in asp.net
how to achieve that
with regards
Balagurunathan.B
|
|
|
|
|
put your connection string as a shared mumber of a class
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Try to define the connection string in a module as public and fill it when u first login to the main/first form. Then u can read it from every other form by calling its name and u can open and close the connection as many times as u want.
|
|
|
|
|
Hi, does anyone here know if vb.net 2005 has a "Print Screen" function to capture the Desktop image? (Just like if you were to press Ctrl + PrintScreen/SysRq".) I figure it has to, or at least have an easy way to access the Window's function for it. Thanks
it took a little trial and error, but...well, still nothing yet...
|
|
|
|
|
|
|
I amt trying to do, if stage =1 then top row..
Then another if to change the pic box and some text, Else write the other text value
Why aint this working, i think it is trying to do the other if yeah (being that it is aligned with it)???. Plus, why does it have a :, i didnt add it, i did it itself!
---
If stage = 1 Then
lblFormName.Text = "Top Row"
If intScoreTop <= 4 Then pcbIcon.Image = My.Resources.Cross_big()
lblScore.Text = "You did ok, but only got " & intScoreTop & vbCrLf & " out of 10"
Else : lblScore.Text = "Well done, you got " & intScoreTop & vbCrLf & " out of 10"
End If
---
|
|
|
|
|
What happens if you step through in the debugger ?
The rules for Then and EndIf are a little odd, from memory. I think your else will execute if state != 1.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
It adds the colon as an in-line line break, because you can't have the statement following the Else on the same line.
Your second If statement is only affecting the statement on the same line, and the Else belongs to the first If statement.
Here is your code indented for clarity, and rearranged to not use one-line If statements:
If stage = 1 Then
lblFormName.Text = "Top Row"
If intScoreTop <= 4 Then
pcbIcon.Image = My.Resources.Cross_big()
End If
lblScore.Text = "You did ok, but only got " & intScoreTop & vbCrLf & " out of 10"
Else
lblScore.Text = "Well done, you got " & intScoreTop & vbCrLf & " out of 10"
End If
---
single minded; short sighted; long gone;
|
|
|
|