|
Hey there,
I have a game plays sort of like risk. You pick up a unit piece and move it around and drop here or there and it processes everything, but I noticed that the screen has some delay in repainting (about 1 second on my computer), I believe the problem is that it is trying to paint the whole screen instead of what is being looked at (IE, the map takes up 10 screens, and the user moves only 1/2 a screen and it paints all 10 screens worth of info). Is there a way to control this? I would really help with the flow of the game if it didn't delay all the time... Thanks for any help and I'll be sure to post when the game is ready to launch early next year!
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
Hey there, hang with me while I attempt to convey my problem better than on my other message board. I have a game plays sort of like risk. You pick up a unit piece and move it around and drop here or there and it processes everything, but I noticed that because of the dynamics of the game the screen has some delay in repainting the screen (about 1 second on my computer), but I do no need the map to be dynamic all the time. I was wondering if I could load in the dynamic map, take some sort of "screen capture" (though it's not a screen capture becuase the map is far larger than the screen) and display a static image. My other board said that screen capture can only get what's on the screen and I know that. But is there a way to grab it from memory, convert it to a static image, and display that instead? That's soo much for any help, and I'll be sure to leave a post when the game finally launches early next year!
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
I have a DataGrid on a Windows form that I populate using a DataSet object. Two of the columns may contain fields with Null values. When both fields in a row are Null, no problem, I display blank cells in the grid using a TableStyle object.
But if the first field in a row is not Null and the second one is Null, I would like to display in the second cell of the grid some text, such as "uknown", or "not applicable" (or maybe color the cell differently). Looping one by one through all DataGrid rows after populating the grid and examining cells data is not an option as I expect the grid to contain up to 2500 rows, so the whole process could be noticeably slow.
I first thought about using multiple table column styles, but I can't figure out how to switch from one style to another based data read at runtime.
I also tried this approach:
' populate the grid
objDGrid.DataSource = objDataSet
'
' define a currency manager
objCurMgr = CType(objDGrid.BindingContext(objDataSet, "openTasks"), CurrencyManager)
'
' define a Binding object attached to the "DataSource"
' property of the DataGrid
If Not (mobjBndg Is Nothing) Then
objDGrid.DataBindings.Remove(mobjBndg)
End If
mobjBndg = New Binding("DataSource", objDataSet, "openTasks")
objDGrid.DataBindings.Add(mobjBndg)
Outside the code portion of the form, I declared:
Private WithEvents mobjBndg As Binding
My idea was to use the Format and Parse events of the Binding object and change in code the formatting of data displayed in cells. I thought the Format event should fire once for each cell in a row when the DataGrid is being populated. But it never does. Why? What am I missing or doing wrong? Is there a better way to accomplish what I want? Can anyone shed more light?
I Googgled with "DataGrid + binding + dynamic formatting" and got zilions of hits, but only examples of simple bindings of controls such as TextBoxes. I couldn't get any example of complex data binding and dynamic formatting of a DataGrid control.
Thank you in advance for any suggestions and hints.
|
|
|
|
|
I'm a newbie. This is a data in 1 column it fill Remark 1 - 10. How i use Ms Acess(VBA) function or query statement to separate it to 10 column.
You are my hope T_T
Thanks
RemAAAARemRm2BBBBRm2Rm3CCCCRm3Rm4DDDDRm4Rm5EEEERm5
Rm6FFFFRm6Rm7GGGGRm7Rm8HHHHRm8Rm9JJJJRm9RmAKKKKRmA
|
|
|
|
|
in VB.NET Store this into a string.
Dim strRemarks = "RemAAAARemRm2BBBBRm2Rm3CCCCRm3Rm4DDDDRm4Rm5EEEERm5
Rm6FFFFRm6Rm7GGGGRm7Rm8HHHHRm8Rm9JJJJRm9RmAKKKKRmA
"
Dim chrARemarks() as String = strRemarks.Split("Rm")
R A M
|
|
|
|
|
hi uthen,
another solution using access vba...
i tried this in access VBA...just created a module & it seemed to work ok
Option Compare Database
Dim strarray, str As String
Dim s
Const test As String = "RemAAAARemRm2BBBBRm2Rm3CCCCRm3Rm4DDDDRm4Rm5EEEERm5Rm6FFFFRm6Rm7GGGGRm7Rm8HHHHRm8Rm9JJJJRm9RmAKKKKRmA"
Sub main()
strarray = Split(test, "")
For Each s In strarray
If s <> "" Then
Debug.Print s
End If
Next
End Sub
hope of some help
|
|
|
|
|
Thanks for your help. If i want to use it as function
and call it in query or form list. How i do that ?
Thanks so mouch
|
|
|
|
|
some form code.....
Option Explicit
Private Sub Form_Load()
Dim strarray, str As String
Dim v As Variant
Const test As String = "RemAAAARemRm2BBBBRm2Rm3CCCCRm3Rm4DDDDRm4Rm5EEEERm5Rm6FFFFRm6Rm7GGGGRm7Rm8HHHHRm8Rm9JJJJRm9RmAKKKKRmA"
'call function from module returning array of parsed elements from string
strarray = retarray(test)
'populate listbox with parsed elements
For Each v In strarray
If v <> "" Then
Me.List1.AddItem (v)
End If
Next
function called from a module....
Public Function retarray(s As String) As Variant
Dim strarray As Variant
strarray = Split(s, "")
retarray = strarray
End Function
is this what you want
|
|
|
|
|
Hi to you all,
I have to manage a network graph (nodes, links and their attributes),
but I don't know the best way to do it.
I found some examples using arraylist, some other examples using hashtables, while i've been using two dictionaries (nodes and links),
what do you think about that?
the tasks i'd have to perform are basically a conversion from a format to another, to sort the links to a couple of attributes and do some calculations.
thanks in advance!
Fuel2Run
|
|
|
|
|
how do i correctly convert a string containing a 32 bit hex value to a uint32,
i dont have any problem when the integer value of the hex would be a positive value
but im having problems when the hex value would represent a negative integer
|
|
|
|
|
How does a hex value represent a negative integer ? Does it start with a - ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
00000000 to 7FFFFFFF represent positive integer values and FFFFFFFF to 80000000 represent negative integer values
|
|
|
|
|
I thought so. You're trying to take an unsigned number ( FFFFFFF does NOT represent a negative number, necessarily ) and turn it into a signed number. The easiest way to do this would be to cast it, at a guess. Or do the conversion manually.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
as uint32 is not a primative type supported directly by vb.net ive been trying to cast it to other types first but ffffffff always ends up as -1,
i guess ill have to convert it manually to a string representing the unsigned decimal value first
|
|
|
|
|
i have a webservice under C:\Inetpub\wwwroot\RetrieveData\ now i want this web service create a txt file under this folder i have changed the permission of this folder to write as well, but still when i run this webservice i get a exception which is C:\Inetpub\wwwroot\RetrieveData\ the path is denied! how to solve this problem ? pls help me! thank you very much!
I am Entry level person
|
|
|
|
|
The user your web service runs under needs permission to create the file.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Has anyone used My.Settings in VS 2005. According to this[^] article once the settings are in place all I should have to do is type My.Settings. and intellisense should display my config settings. Intellisense it not working for me with My.Settings. Has anyone else ran into this? I'm using V2 2005 Beta 2...maybe it is a problem with the beta and I'll need to get the final release....
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
Hi,
What would be the VB.Net equivalent of these statements?
System.IO.MemoryStream m;
m= (System.IO.MemoryStream)theReport.ExportToStream(
CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
Thanks,
Jamie
|
|
|
|
|
Dim m as System.IO.MemoryStream
m = theReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)
I *think*
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Dim m As System.IO.MemoryStream
m = CType(theReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant C++: C# to C++ Converter
Instant J#: VB.NET to J# Converter
Clear VB: Cleans up outdated VB.NET code
|
|
|
|
|
DirectCast would be better, more efficient. CType is for changing the type to something completely different. Like an int to a float.
Dim m As System.IO.MemoryStream
m = DirectCast(theReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
|
|
|
|
|
Yes, provided that you know that the cast target run-time type is exactly System.IO.MemoryStream - otherwise you have an exception. I'm not familiar with CrystalDecisions, however, so I thought CType would be safer.
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant C++: C# to C++ Converter
Instant J#: VB.NET to J# Converter
Clear VB: Cleans up outdated VB.NET code
|
|
|
|
|
Thanks guys. I get it now.
Jamie
|
|
|
|
|
Hi all,
I am new to VB, just writing afew programs as i learn. I made an easy shortcuts program eg. click a button and start a program, i have no problem with iexplorer or firefox but when i try another exe eg.. a game i get this message:-
An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in system.dll
I have tryed Process.start / adding a process component / adding the full path of the file, but nothing.
thanks,
|
|
|
|
|
I've written a windows service that contains some class objects. My problem is that only the code in the OnStart sub will execute. When I do a MyClass.RunThisSub() from inside the OnStart, the code in RunThisSub is not execute. If I copy the same exact code from RunThisSub into the OnStart it runs just fine. It is probably something simple I'm over-looking since this is my first Windows Service....any help would be appreciated.
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|