|
Encoding.Unicode.GetString(Encoding.Default.GetBytes(yourStringVariable))
|
|
|
|
|
i want to make program like this:
if DataGridView2.item(SID).value = DataGridView1.item(LID).value then
color=green
else
color=red
i want all item list in DataGridView2.item(SID).value will be checked.
not only first cell
i mean like this(see the picture):
http://i43.tinypic.com/9posc2.jpg
modified on Thursday, February 26, 2009 8:24 AM
|
|
|
|
|
Colouring the background of a DataGridView-Cell works as following listed:
Dim cs As DataGridViewCellStyle
cs = New DataGridViewCellStyle
cs.BackColor = Color.Green
aDataGridView.Rows(r).Cells(c).Style = cs
Note, that the above code overwrites existing CellStyles you already assigned to a cell (maybe via the GUI-Design-Tool and so on).
For a complete row, you could use instead:
aDataGridView.Rows(r).DefaultCellStyle.BackColor = Color.Green
modified on Thursday, February 26, 2009 7:45 AM
|
|
|
|
|
Seee picturee.... http://i43.tinypic.com/9posc2.jpg
If DataGridView2.Item("BLnumber2", e.RowIndex).Value = DataGridView1.Item("BLNumber1", e.RowIndex).Value Then
modified on Thursday, February 26, 2009 9:19 AM
|
|
|
|
|
What exactly you need to know?
|
|
|
|
|
|
Hi to Everyone there,
I am going to deploy my vb.net2005 project.
I am wondering about the path name of all crystal report to be given in my code (code to get the crystal report in the crystal report viewer).
Should I give the application path or something else, since after deploying my path wont be the same.Or is there any other method to handle the same.
currently I am hardcoding the path like following
Dim strReportPath As String = "D:.....\rp1.rpt"
Thanks in advance
I am a learner Always
<div class="ForumMod">modified on Thursday, February 26, 2009 5:55 AM</div>
|
|
|
|
|
Well, what folder are you deploying the reports to in your installer?? If they are static reports (that never change), then you could put them in the Application folder (where your app's .EXE is) and then just use Path.Combine(Application.StartupPath, "report.rpt") in your code to generate the fully qualified path name.
|
|
|
|
|
thanks Dave for your reply,
I am a beginner. If u don't mind I need little more clarification.
I guess my reports are dynamic. I ask the user to input certain parameter before writing my CR code. And then I pass those parameters (eg: stud_Id) with the SQl query. Is this what u mean by a dynamic report. Hopefully so.
Could you please suggest a complete steps now. Should I put them in a folder? or leave the reports as it is(same position during creation). Then what do i write for the path.
Thanks in advance
I am a learner Always
|
|
|
|
|
Where are you putting the report files that you're telling CrystalReports to use when your report is generated??
|
|
|
|
|
thanks,
Currently I am not putting the report files in any folder...as when it gets created the same place it is in.(with the forms and module)...
Please suggest me. I don't mind putting the reports in folder or anything like that. But it should just work
Regards,
HImangshu S
|
|
|
|
|
So, you're generating the report file the CR is going to use "on-the-fly"?? I would suggest the CommonApplicationData[^] folder, but exactly which folder depends on your requirements.
You use that enum with Environment.GetFolderPath[^] and then you can use the Path class to build the complete filename.
|
|
|
|
|
|
Try this:
n = TextBox1.Text
If IsNumeric(n) then
Dim sTemp as string = n.Substring(0,1)
TextBox1.Text = n
End If
alex_nel
|
|
|
|
|
myventsi wrote: Why it' s not working?
Because your code is utterly wrong.
The last iteration of your while loop will result in n being zero, since that is what makes the while-test fail; now when n is such that n/10 is zero, then for sure n\10 is also zero.
What you need is a modulus operator, and fortunately your language has one.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Can anyone please give me a hint how to check whether a file i being accessed by another process or not, so that i can open it for manipulation.
Thanks in advance!
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
Private Function isFileInUse(ByVal sFileName As String) As Boolean
Dim nFileNum As Integer
' If the file is already opened by another process and the specified type of access
' is not allowed the Open operation fails and an error occurs.
Try
nFileNum = FileSystem.FreeFile()
FileSystem.FileOpen(nFileNum, sFileName, OpenMode.Binary, OpenAccess.Read, OpenShare.LockReadWrite)
FileSystem.FileClose(nFileNum)
Catch
Return True
End Try
Return False
End Function
alex_nel
|
|
|
|
|
I'm trying to know whether the form is loaded into memory or not.
My form may be hidden.
|
|
|
|
|
|
Hi,
I am new to this vb.net, my problem is i have created the windows service in vb.net c#. I deployed it in my system when i am try to start that service it showing the error as
Error:1053 could not start the service on Local system
The service didnot respond to the start ro control request in a timely fashion
I have tried to resolve it, but i could not... Please help me to solve this problem.
Thanks in advance.
With Regards,
Samson
|
|
|
|
|
Does the deployment machine have the correct .NET Framework installed on it??
In the OnStart method of your service, did you create an instance of your worker class on a seperate thread?? You don't just put all of your code in OnStart and never let that method return. This is exactly the error you get when you do this.
Your worker code should be running under it's own thread, that you create in the OnStart event of your service.
|
|
|
|
|
Hi im new to this forum and programming in general!anyways iv wanted to write my own poker bot in visual basic for a while now because all the poker bots for sale online are controled by the casinos and you allways lose wot u win,if sum1 could help me with how i can:
1:get the bot to lock on to the table,i know that usually the bot injects into the dll files of the poker program but thats how the casinos detect the bot
2:get the bot to see my cards and the table cards.iv read about screen scraping but im not sure how this works.
3:i want to write the code for how the bot will decide weather to fold,call or raise based on how i play and the many books iv read on how to play but any tips are welcomed.
anyway any help would be great,
DySfUnKtIoNaL!!
|
|
|
|
|
Of the three things you've listed, only the third is really at your level.
Injecting DLLs into other processes is hacking and quite frankly I wouldn't know where to start - In fact, I'm not in the least bit interested in finding out because it isn't required for writing "normal" applications.
Screen scraping is basically taking a view of the screen and interpreting what is displayed there. If the "screen" is a text based console it is very easy (and that's what most screen scrapers are doing, converting the text on a console). If the "screen" is a web page it gets slightly trickier, but since it is essentially still all text then it is doable. It gets difficult when you have AJAX adding stuff into the page after it is loaded. Finally, there is the kind where the "screen" is a graphic. The graphic can be a snapshot of the screen at a particular moment, but it then has to apply some sort of OCR (optical character recognition) algorithm to the image to find out what it says. Unless you can supply hints to the OCR as to where the text is then it will be slow.
Finally, on to the algorithms for deciding when to hold, fold, raise, etc. That is fairly simple maths and there are books that tell you the odds so you can calculate it. As to how to program that... Well, it is a bit much for a forum response. I'd start by creating a list of all the rules and working out what I need to implement it.
|
|
|
|
|
dysfunktional wrote: 1:get the bot to lock on to the table,i know that usually the bot injects into the dll files of the poker program but thats how the casinos detect the bot
Yep. And you also cannot do DLL injection in C#, VB.NET, or any other purely managed language because they don't support the exports required to do DLL injection.
dysfunktional wrote: 2:get the bot to see my cards and the table cards.iv read about screen scraping but im not sure how this works.
You have to capture a screen image and, basically, do an OCR for the card values. The screen capture is the easy part. Reading the card faces is going to be VERY difficult, and frankly, WAY beyond your abilities.
dysfunktional wrote: 3:i want to write the code for how the bot will decide weather to fold,call or raise based on how i play and the many books iv read on how to play but any tips are welcomed.
This is not as easy as it sounds. There are sooo many card combinations and different ways to play them against a variety of players with varying skill, you'd have to write some kind of learning network that improved it's play as it went. If the bot played as you did all the time, you'd lose all your money in short order. Since you're not playing, you're not learning better skills, so your bot has to do the learning for you. I hope you're an expert in artificial intelligence and neural networks.
|
|
|
|
|
Hi 2 all,
we are developing a mini erp using vb.net.
It has couple of modules. According to the user requirement, custom modules should be installed. I was unable to write code for custom deployment.
My problems are :
1. It has to show the modules list while installing
2. according to the selected modules it has to deploy the application
Thanks in advance,
annoce
|
|
|
|