Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
T

TeiUKei

@TeiUKei
About
Posts
31
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to assign the total value of a column to the footer?
    T TeiUKei

    Dear all, I was doing a calculation on the total of costs using datagrid. There are only two row in my data. I use the following to insert the summary to the footer but is not success which is as below: For RawCount = 0 To ItemCount - 1 Quantity(RawCount) = Me.dtGrid.Items(RawCount).Cells(2).Text Price(RawCount) = Me.dtGrid.Items(RawCount).Cells(5).Text Costs(RawCount) = Quantity(RawCount) * Price(RawCount) Me.dtGrid.Items(RawCount).Cells(6).Text = Costs(RawCount) TotalQuantity = Quantity(RawCount) + TotalQuantity TotalCost = TotalCost + Costs(RawCount) If Me.dtGrid.Items(RawCount).ItemType = ListItemType.Footer Then Me.dtGrid.Items(RawCount).Cells(2).Text = TotalQuantity End If Could anyone please help me check what is the problem and why the data is not display in my footer raw? Thank you so much for the help!

    ASP.NET help question tutorial

  • How to do a interactive camera 3D view in C#
    T TeiUKei

    Thanks to Andrew for kindly answer my question. Sorry to Ashfield if i have ask a stupid question but i have debugged it and it appeared no error. So, i just want to get what is wrong behind my logic. Anyway, thank you!

    C# csharp graphics help tutorial

  • How to do a interactive camera 3D view in C#
    T TeiUKei

    I have done a code on 3D office. I would like to do it in interactive way which by pressing the arrow button, the object can be viewed from different perspective. However, my result come out with static image and my objects all disappear. The object exists if i doesn't include the Checkmovement function inside. I wonder what mistake i have done. Could anyone please kindly help me review my code and give comment. Thanks. using System; using System.IO; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using MTV3D65; namespace TrueVisionTest { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Main_Quit(); Application.Exit(); } //Declare the TrueVision3D 'parts' TVMesh _meshRoom = null; TVMesh _meshFan = null; TVMesh _meshTable = null; TVMesh _meshSofa = null; TVMesh _meshComputer = null; TVMesh _Lamp = null; TVMesh _Cabinet = null; TVMesh _meshChair = null; TVEngine TV = null; TVScene _scene = null; TVGlobals global = new TVGlobals(); TVLightEngine _TVLightEngine = null; TVInputEngine InputEngine; TVTextureFactory TexFactory = new TVTextureFactory(); TVMaterialFactory MatFactory = new TVMaterialFactory(); TVLandscape Land; TVScene Scene; float sngPositionX; float sngPositionY; float sngPositionZ; float sngLookAtX; float sngLookAtY; float sngLookAtZ; float sngWalk; float sngStrafe; float sngAngleX, sngAngleY; int tmpMouseX, tmpMouseY; bool tmpMouseB1, tmpMouseB2, tmpMouseB3, tmpMouseB4; int tmpMouseScrollOld, tmpMouseScrollNew; float x_move = 30.0f, y_move = -30.0f, z_move = 150.0f; void InitializeTrueVision() { TV = new TVEngine(); TV.Init3DWindowed(this.pictureBox1.Handle, true); TV.SetSearchDirectory(System.Windows.Forms.Application.ExecutablePath); TV.SetAngleSystem(CONST_TV_ANGLE.TV_ANGLE_DEGREE); TV.DisplayFPS(true); } TV_LIGHT light;

    C# csharp graphics help tutorial

  • Select Multiple File in Single Open File Dialog Box
    T TeiUKei

    Finally get it right. What a mistake i make! Thanks for help!!

    Visual Basic tutorial question

  • Select Multiple File in Single Open File Dialog Box
    T TeiUKei

    Sorry for the trouble, it seems the same problem occur although i changed it as u have stated. Is there any other error? Dim OpenFile As OpenFileDialog = New OpenFileDialog Dim ImgName() As String Dim LoopCtrl As Integer OpenFile.Filter = "JPG Images|*.JPG|Bitmaps|*.BMP|GIF Images|*.GIF|All Images|*.BMP;*.GIF;*.JPG" OpenFile.FilterIndex = 10 OpenFile.Multiselect = True If OpenFile.ShowDialog = Windows.Forms.DialogResult.OK Then ImgName = OpenFile.FileNames For LoopCtrl = 0 To ImgName.Length - 1 objImage(LoopCtrl) = Image.FromFile(ImgName(LoopCtrl)) Next LoopCtrl OriginalPic.Image = objImage(0) OriginalPic1.Image = objImage(1) End If

    Visual Basic tutorial question

  • Select Multiple File in Single Open File Dialog Box
    T TeiUKei

    Thanks..now i can select multiple file but it appeared some error lines. For the below coding For LoopCtrl = 0 To ImgName.Length objImage(LoopCtrl) = Image.FromFile(ImgName(LoopCtrl)) Next LoopCtrl It come out error "Object reference not set to an instance of an object". How i can solve it?

    Visual Basic tutorial question

  • Select Multiple File in Single Open File Dialog Box
    T TeiUKei

    First of all, thanks for reply. I was holding down the control key while selecting file, but it appeared that the file name changed and only 1 selected instead of both filenames appeared. Any solution to it? Thanks!

    Visual Basic tutorial question

  • Select Multiple File in Single Open File Dialog Box
    T TeiUKei

    I would like to create a open file dialog that can display multiple images in 1 single click. However, i only manage to select an image in 1 time. Could anyone please teach me how to select multiple image per open file dialog? Thanks so much! Dim OpenFile As OpenFileDialog = New OpenFileDialog Dim ImgName() As String Dim LoopCtrl As Integer OpenFile.Filter = "JPG Images|*.JPG|Bitmaps|*.BMP|GIF Images|*.GIF|All Images|*.BMP;*.GIF;*.JPG" OpenFile.FilterIndex = 10 OpenFile.Multiselect = True If OpenFile.ShowDialog = Windows.Forms.DialogResult.OK Then ImgName = OpenFile.FileNames For LoopCtrl = 0 To ImgName.Length - 1 objImage(LoopCtrl) = Image.FromFile(ImgName(LoopCtrl)) Next OriginalPic.Image = objImage(0) OriginalPic1.Image = objImage(1) End If This is how i write the code. Could anyone please kindly teach me how to select multiple image per open file dialog? Thanks so much!

    Visual Basic tutorial question

  • Is there anyway vb.net can use to extract image feature?
    T TeiUKei

    Thanks 1st of all, what i mean by 'extract image color feature' is to extract the color information of the specific pixel. For example, the pixel of (20,30) of an 800x600 images which contain RGB value = 123 192 134. Once i specify the pixel, then the corresponding value will be given.

    Visual Basic csharp tutorial question

  • Is there anyway vb.net can use to extract image feature?
    T TeiUKei

    I am working on a project that try to extract image color features. I wonder if vb.net can use to perform the function. If that is possible, can anybody tell me how to do it with any sample code?

    Visual Basic csharp tutorial question

  • How to create a openGL GetPixel() Function ?
    T TeiUKei

    I have no knowledge in openGL, can anyone tell me how to write a getpixel function?

    C / C++ / MFC

  • How to write to csv file start from specific line?
    T TeiUKei

    I know csv is a comma-separated file and i would like to write data into it start from certain line and not read from it. Anyway, thanx for help!Could anyone pls give better suggestion?

    Visual Basic tutorial question

  • How to write to csv file start from specific line?
    T TeiUKei

    Is that anyway to write to csv file start from specific line of record? Let say start from the third line of the csv file.

    Visual Basic tutorial question

  • Question about CSV file [modified]
    T TeiUKei

    Really? So, how about when it convert to text file? Anyway,this is where aaa defined which you ask about. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim Data1 As New PropertyCreateFile Dim aa As New ArrayList aa.Add("A45855") aa.Add("b") aa.Add("120306") aa.Add("c234") aa.Add("M45686") Data1.Data = aa Data1.Counter = 3 aaa.CreateCSVFile(Data1) End Sub 'This is the code for PropertyCreateFile. It will take in the data detail and 'counter on how many times it will loop. Public Class PropertyCreateFile Dim Str As ArrayList Dim Ctr As Integer Dim UBSBadgeNo As Integer Public Property Data() As ArrayList Get Return Str End Get Set(ByVal Value As ArrayList) Str = Value End Set End Property Public Property Counter() As Integer Get Return Ctr End Get Set(ByVal Value As Integer) Ctr = Value End Set End Property End Class Public Function CreateCSVFile(ByVal CreatePP As PropertyCreateFile) As String Dim sFilename As String = (CurDir & "/CSVFile.csv") Dim b As Integer Dim a As Integer Dim c As String Dim x As String Dim Data(4) As String FileOpen(20, sFilename, OpenMode.Output) For b = 0 To CreatePP.Counter - 1 For a = 0 To 4 c = CStr(CreatePP.Data(a)) If c.Length <= 1 Then c = c.PadRight(2, CChar(" ")) ElseIf c.Length <= 2 Then c = c.PadRight(3, CChar(" ")) ElseIf c.Length > 2 And c.Length <= 4 Then c = c.PadRight(5, CChar(" ")) ElseIf c.Length > 4 And c.Length <= 6 Then c = c.PadRight(7, CChar(" ")) ElseIf c.Length > 6 And c.Length <= 11 Then c = c.PadRight(12, CChar(" ")) End If Data(a) = c Next a x = Data(0) + Data(1) + Data(2) + Data(3) + Data(4) WriteLine(20, x, Environment.NewLine) Next b FileClose(20) Return Nothing End Function Thanks for help, Dave!!

    Visual Basic question help tutorial

  • Question about CSV file [modified]
    T TeiUKei

    Well, this is the actual code i am doing. I still can't find where the problem is although i use Environment.Newline, sorry for the troublesome! This is the data i try to displayed Dim Data1 As New PropertyCreateFile Dim aa As New ArrayList aa.Add("A4585525581") aa.Add("b") aa.Add("b2") aa.Add("c234") aa.Add("M45686") Data1.Data = aa Data1.Counter = 3 'aaa.CreateTextFile(Data1) aaa.CreateCSVFile(Data1) Public Function CreateCSVFile(ByVal CreatePP As PropertyCreateFile) As String Dim sFilename As String = (CurDir & "/CSVFile.csv") Dim b As Integer Dim a As Integer Dim c As String Dim Data(4) As String FileOpen(20, sFilename, OpenMode.Output) For b = 0 To CreatePP.Counter - 1 For a = 0 To 4 c = CStr(CreatePP.Data(a)) 'For these if statement, i intend to get and check the 'length of data pass in by user, so the data can displayed 'systematically If c.Length <= 1 Then c = c.PadRight(2, CChar(" ")) ElseIf c.Length <= 2 Then c = c.PadRight(3, CChar(" ")) ElseIf c.Length > 2 And c.Length <= 4 Then c = c.PadRight(5, CChar(" ")) ElseIf c.Length > 4 And c.Length <= 6 Then c = c.PadRight(7, CChar(" ")) ElseIf c.Length > 6 And c.Length <= 11 Then c = c.PadRight(12, CChar(" ")) End If Data(a) = c 'Is it right if i use Environment.NewLine here? Write(20, Data(a), Environment.NewLine) Next a Next b FileClose(20)

    Visual Basic question help tutorial

  • Question about CSV file [modified]
    T TeiUKei

    It is almost the same,i highlighted the change the below. I gt a line of data which i intend to display in CSV file as below, "A12435625" "b" "b2" "c44566" "A12435625" "b" "b2" "c44566" however with my coding, it only displayed as "A12435625" "b" "b2" "c44566" "A12435625" "b" "b2" "c44566" What is my mistake and how to display my desire answer? Below is my coding, pls kindly help! FileOpen(2, sFilename, OpenMode.Output) For b = 0 To CreatePP.Counter - 1 For a = 0 To 4 c = CStr(CreatePP.Data(a)) If c.Length <= 1 Then c = c.PadRight(2, CChar(" ")) ElseIf c.Length <= 2 Then c = c.PadRight(3, CChar(" ")) ElseIf c.Length > 2 And c.Length <= 4 Then c = c.PadRight(5, CChar(" ")) ElseIf c.Length > 4 And c.Length <= 6 Then c = c.PadRight(7, CChar(" ")) ElseIf c.Length > 6 And c.Length <= 11 Then c = c.PadRight(12, CChar(" ")) End If Write(2, c) Write(2,c,ControlChars.Newline) Next a Next b FileClose(2) I appreciate so much for help!Thanx!

    Visual Basic question help tutorial

  • Question about CSV file [modified]
    T TeiUKei

    Thanx for help although it didn't work. As a result,it ony return "aaaaaaaa",blank line,"b",blank line,"b2". Do you have another tricks or idea?

    Visual Basic question help tutorial

  • Question about CSV file [modified]
    T TeiUKei

    I gt a line of data which i intend to display in CSV file as below, "A12435625" "b" "b2" "c44566" "A12435625" "b" "b2" "c44566" however with my coding, it only displayed as "A12435625" "b" "b2" "c44566" "A12435625" "b" "b2" "c44566" What is my mistake and how to display my desire answer? Below is my coding, pls kindly help! FileOpen(2, sFilename, OpenMode.Output) For b = 0 To CreatePP.Counter - 1 For a = 0 To 4 c = CStr(CreatePP.Data(a)) If c.Length <= 1 Then c = c.PadRight(2, CChar(" ")) ElseIf c.Length <= 2 Then c = c.PadRight(3, CChar(" ")) ElseIf c.Length > 2 And c.Length <= 4 Then c = c.PadRight(5, CChar(" ")) ElseIf c.Length > 4 And c.Length <= 6 Then c = c.PadRight(7, CChar(" ")) ElseIf c.Length > 6 And c.Length <= 11 Then c = c.PadRight(12, CChar(" ")) End If Write(2, c) Next a Next b FileClose(2) -- modified at 0:27 Thursday 12th October, 2006

    Visual Basic question help tutorial

  • How to set data length fixed in textfile and csvfile?
    T TeiUKei

    I was stuck and found no information about how to copy data received into fixed length? Anyone can give or recommend how to start? For example: I received data 040824,1053,00028181595,000 040824,1054,00028159511,001 and i want to set the data length for 1st column as 6,then 2nd as 4 and 3rd as 11 in my textfile. What should i do?

    Visual Basic tutorial help question

  • How to send data into textfile?
    T TeiUKei

    It is the same way that i am doing and it doesn't work. The data that copied into textfile is not what i want. The data shown in textfile is systam.collection.arraylist and what i want is a,b and c. Anyway, thanx for help!

    Visual Basic testing beta-testing help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups