|
Your not Blocking input on one thread and trying to Unblock it on another, are you? If so, it's not going to work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
this might be the problem!!!
well, then i have an idea. when i call the function, that includes the blockinput function, i open a form dialog. maybe i call the blockinput function in the "show" and "hide" function of this form...
|
|
|
|
|
Hi,
when converting a string to double value i am losing
my comma:
<br />
Dim str as string<br />
Dim value as double<br />
<br />
set str = "123.451"<br />
<br />
value = CDbl(str)<br />
<br />
output: 123451
anybody has a solution?
happy coding,
-mark
os win2000 vba office 2003, vc++ 6.0
|
|
|
|
|
I would guess that this behaviour is by design. A Double datatype is only capable of storing a NUMBERIC value. A comma is not a number, and hence it cannot be stored.
Only way to represent the comma is to store it in a string
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Now,
I put two winsock controls in Form.
Here is my Form Load code:
Dim cnt, cnt1
cnt = 0
For i = 1 To List1.ListCount
Load Winsock1(i)
Winsock1(i).LocalPort = List1.List(cnt)
Winsock1(i).Listen
For j = 1 To List1.ListCount
cnt1 = cnt + 1
Winsock2(j).LocalPort = List1.List(cnt1)
Winsock2(j).Listen
Next
MsgBox List1.List(cnt)
cnt = cnt + 1
Next
Error is:
Run-time Error "438"
Object doesn't support this Property and Method.
Mybe Problem is Index Value of Both winsock1 and winsock2 controls.
I want to First Port Number Open and Listen by winsock1(i) then second Port Number open and Listen by Winsock2(j).
Please send me Reply soon
Mohan
Mohan Balal
|
|
|
|
|
You didn't say what line the error occured on. But, I'll take a guess and say that .List() is not a member of List1 . You don't say what List1 is so I really can't tell you what to do to correct it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I create control array of Winsock control, while compile it Gives an Error:
This is my code in Form Load event
rs.Open "select * from port_table", cn, adOpenKeyset, adLockOptimistic
While Not rs.EOF
List1.AddItem rs!portno
rs.MoveNext
Wend
rs.Close
Dim cnt
cnt = 0
For i = 1 To List1.ListCount
Load Winsock1(i)
Winsock1(i).LocalPort = List1.List(cnt)
Winsock1(i).Listen
MsgBox List1.List(cnt)
cnt = cnt + 1
Next
In this line It gives Error:
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Error:
Compile Error:
Procedure declaration error as type doesn't match description of event or procedure having the same name
-------------------------
I want to open and Listen all the Ports which are store in the (Port_table) table. Then communicate with all the Ports.
Please Help me as soon as Possible.
Thanks
Mohan
Mohan Balal
|
|
|
|
|
Set the index property of your winsock control to 0 then modify the function delaration with this one:
Private Sub Winsock1_DataArrival(Index As Integer, ByVal bytesTotal As Long)
|
|
|
|
|
Hi,
I am developing a custom control in VB.net. For that i am using MsFlexGrid in Windows form.
I added the rows in the FlexGrid at run time and at the same time added checkboxes in 0th column of each row.
But when the number of rows increases more than size of FlexGrid the scroll Bar appears. When i scroll the vertical scroll bar,the rows scroll accordingly but the check boxes are fixed. They don not move along with the cells they are placed in.
Please help.
Lata
|
|
|
|
|
i try to code in web application, i mean 'code behind'. but it doesnt display anything when i click on items
slect = lstmilestone.selectedITem.Value
stSQL="select staffid, lastname, firstname, email "
stSQL &=" from staff "
stSQL &=" where staffId = " & slect
try
mlstonecommand = new oledb.oledbcommand()
with mlstonecommand
.connection = new oledb.oledbconnection(connstr)
.connection.open()
.commandText = stSQL
lstoneDreader = .ExecuteReader(ComandBehavior.SingleRow)
End with
if mlstoneDreader.Read()
with mlstoneDreader
txtid.text = .item("staffID").tostring
txtmlname.text = .item("Firstname").Tostring
txtdesc.text = .item("LastName").ToString
End if
could anyone help me to figure out the problems.
thanks in advance
|
|
|
|
|
Hi, first of all sorry for my bad english as I am brazilian...
I want to know how to do something i was very used to in Vb6: custom types that has custom types in it , like in:
Public Type LowerLevel
Dim Value(1 to 100) as integer
End type
Public Type UpperOne
Dim UnderOneLevel (1 to 1000) as LowerLevel
End Type
public MyVariable(1 to 10) as UpperOne
By doing so, I was able to use the variable Myvariable(1 to 10).UnderOnelevel(1 to 1000).Value(1 to 100)... So i could type:
Myvariable(1).UnderOnelevel(555).Value(32) = 123 with no problems at all
Now the Big VB.Net question: How do I do that in .net?
It´s not as simple as it seems, because the structure (that substitutes "type" in .net") cannot have the "arrays" of integer with a declared size in the structure, so:
Public Structure LowerLevel
friend Value(100) as integer
End type
would be invalid because of the "100" in it. Anyway,
Public Structure LowerLevel
friend Value() as integer
End type
would be OK.
Now my example:
Public Structure LowerLevel
friend Value() as integer
End Structure
Public Structure UpperOne
Dim UnderOneLevel () as LowerLevel
End Structure
public MyVariable(10) as UpperOne
It compiles ok in VB.net.... But what if I need 1000 Underonelevel´s and 100 values in each????
The only possible way I could get it to work was the ugliest one:
public x ,y ,z as integer
for x = 1 to 10
redim myvariable(x).underonelevel(1000)
next x
for y = 1 to 10
for x = 1 to 1000
redim myvariable(y).underonelevel(x).value(100)
next x
next y
Why did I do it?
I noticed if I only declare something like:
redim Myvariable(10).underonelevel(1000)
redim Myvariable(10).underonelevel(1000).value(100)
I will only have created 100 "values" in Myvariable.underonelevel(1000),
so Myvariable(10).underonelevel(1000).value(55) would be valid
in the other hand
i wont have 100 "values" in any other "underonelevel" so
Myvariable(10).underonelevel(999).value(55) would not be valid because in Myvariable(10).underonelevel(999) it was not declared how many "values" the variable should have
Similarly, so Myvariable(9).underonelevel(1000).value(55) would not be valid because of the nine... and so on...
Anyway it could be done like in the "old" Vb6????
Do I really need all this code(and time, it took me 30 seconds to init the app)???
Hope someone can help me!
Thanks in advance!
Patrick Goettert
|
|
|
|
|
I am porting a VB .Net Window application to a variety of foreign languages. With the Traditional Chinese version of Windows 2000, all of my forms and controls are vertically stretched. Some of the controls run off the bottom of the form too. The spacing between the controls is taller than usual. I cannot reproduce this strange behavior with any other versions of Windows, including French, German, and English. I cannot reproduce this bug with applications written with VB 6.
I have tried downloading other sample .Net Window applications from the web and they also suffer from the same problem. Are there any ways to get around this problem? I have not actually translated any of the string contents to any other languages yet.
Wesley Leong
|
|
|
|
|
Anyone recommend a good component to sync a sql database to Outlook's contacts/tasks/events? Intellisync looks great, but $50K(!) is a bit steep.
Thanks!
Chris
|
|
|
|
|
How about a link to the article your talkin' about?
I have to ask... What experience do you have in programming? Be it COBOL, Fortran, C++, C#, any version of BASIC, WinSock, SDK's, .NET Framework, ... ?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
Now I read images properties with "type declaration".
But I don't still image's read pixels.
How I read image's line? (10W, 50H)
1,2,3,4,5,6,7,8,9,10W, 1st H
1,2,3,4,5,6,7,8,9,10W, 2st H
1,2,3,4,5,6,7,8,9,10W, 3st H
...
1,2,3,4,5,6,7,8,9,10W, 50th H
http://www.2ncielbilgisayar.com
|
|
|
|
|
HI,
I can't fully understand your question but if your trying to read the image pixel in VB then here's an alternative.
1. Put a PictureBox in your form.
2. Load your desired image by setting its Picture property.
3. Then use this code
dim x as long
dim y as long
dim rgbColor as long
For y = 0 To picBox.ScaleHeight - 1
For x = 0 To picBox.ScaleWidth - 1
rgbColor = GetPixel(picBox.hDC, x, y)
Next x
Next y
|
|
|
|
|
You understood me. Thank you.
rgbColor = GetPixel(picBox.hDC, x, y)
I saw a few .hDC in example codes.
And you wrote .hDC in your code.
what does .hDC?
Has vb6 got GetPixel command?
http://www.2ncielbilgisayar.com
|
|
|
|
|
GetPixel is an API. You can declare this at the top of your code
Private Declare Function GetPixel Lib "gdi32" _
(ByVal hDC As Long, _
ByVal x As Long, _
ByVal y As Long) As Long
hDC is a device context handle, needed when working a display or printer. This can be compared to HWND when your are working with window object, one use of HDC on the other hand is for drawing.
|
|
|
|
|
I am working on a VB.Net application that will have forms with textboxes and datagrids and will populate with data from a database. When the user makes a change to a value or many values. How do I update my database,I do not mean how to write an Update statement. There are several tables involved and I am looking for the best way to update when the user hits the save button. Do I have to update all the tables or is there a better way to track modified fields.
Also, any suggestions on using Datadapter to fill dataset amd update modified rows datagrids.
Thanks
|
|
|
|
|
Hi,
I've searched hi and low to find out how you can draw outside of the Form, but haven't found anything!
Please can anyone help?
I'm trying to draw rectangles outside of my Form, of course it gets Clipped by the Form itself. I've tried to modify the Clip for the Form, but I can't seem to change it whatsoever. Is it possible to create a Graphics object for Windows itself? So that you can draw anywhere on the screen??
Any help or advice would be much appreciated!!
Many thanks!
Richard
|
|
|
|
|
I am looking for scripts or classes that can do the following:
1. Search through a set of folders for html files
2. Open the files one by one to parse
3. Count tags and attributes in each html document, tally how many of each in the document, and output the tallies to a file
4. Give properties of the html file, like file size
I've done asp.net development before, I just have never had to do any of these things. If you can help with any of these 4 things, I would greatly appreciate it. VB preferrably, but I could use C#.
Thanks so much.
I would rather do a VB Project than ASP.NET, but could use that code, too!
|
|
|
|
|
hello to all
i got some problem with child forms in my vb.net application.
in my application i need to maximize some child forms when they are loaded (set the windowstate to maximized at design time).
if i do so then, the next form opened which is not be maximized and the windowstate is also set to "normal" at design time also getting maximized (awwwwww it sucks). why this happens so ?. (i guess its setting the prev. forms window state .... )
i have set the maximizebox to "flase" for all the forms which i don't want to maximize and set the formboaderstyle to "fixedsingle"
to solve my problem what should i do ?
in short >> i want to retain the childforms windowstate property set at design time (not to be changed automatically at run time)
please some body help me out ...
adv. thanks
Mohan G
|
|
|
|
|
This is how Windows is designed. You can't change it and there is no way around this.
If you maximize a client window, they all get maximized. If you restore a client window to normal, they all are returned to normal.
If you want to simulate a miximized form, you'll have to size it to the client window area in code and update the size if the parent window's size changes.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thank you rage
as you said its behaving the same
so i have changed my other forms to normal only (which were needed to load as maximized earlier) hope the problem will be solved ...
|
|
|
|
|
Hello,
i like to seperate an incoming string to an array. The values are delimited by commas.
input string format like "122.23, 232.0, 12.34"
I think of using the split function:
<br />
Dim inputstr as variant<br />
<br />
list = split(inputstr,",")<br />
<br />
After this i like to put the several values in double format variables. This require some typecasting, right? Does anybody has the syntax for the loop and the typecyasting? I am new to vb..
happy coding,
-mark
|
|
|
|
|